Skip to content

fix: use execFile instead of exec for npm calls-W-23661850 - #1532

Merged
WillieRuemmele merged 1 commit into
mainfrom
sl/W-23661850
Aug 4, 2026
Merged

fix: use execFile instead of exec for npm calls-W-23661850#1532
WillieRuemmele merged 1 commit into
mainfrom
sl/W-23661850

Conversation

@soridalac

@soridalac soridalac commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Summary

  • Use execFile instead of exec for npm shell calls in diagnostics hook
  • exec spawns a shell (cmd.exe on Windows), which resolves commands from CWD before PATH
  • Both plugin-info and plugin-auth fixes are required — sf doctor triggers diagnostics hooks in both plugins

Test plan

  • Existing unit tests pass
  • Verified on Windows VM — CWD-local npm.cmd no longer executes
  • Verified on macOS — sf doctor works normally

What issues does this PR fix or reference?

plugin-info PR: salesforcecli/plugin-info#1246
@W-23661850@

@WillieRuemmele

Copy link
Copy Markdown
Contributor

@WillieRuemmele
WillieRuemmele merged commit 35a652f into main Aug 4, 2026
16 checks passed
@WillieRuemmele
WillieRuemmele deleted the sl/W-23661850 branch August 4, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants